<script type='text/javascript'>
function preview5(){
var x = document.getElementById('file5');
if(!x || !x.value) return;
var patn = /\.jpg$|\.jpeg$|\.gif$/i;
if(patn.test(x.value)){}else{
alert('您选择的似乎不是图像文件。');
}}
</script>
<?php
 use_helper("users");
        if(2==$_REQUEST["userEdit"]){
    switch($_REQUEST["userload"])
            {
                case "1": //保存新建相册
                    //echo "<script>showInfos(1,1);</script>";
                    break;
                case "2"://添加相片
                case "4"://修改相册名称
                    //showInfos(1,5,".$_REQUEST["photoId"].");
                    break;
                case "3":
                    break;
                default://不做任何修改
                    break;
            }
}else{
switch($_REQUEST["userload"])
            {
                case "1": //加载新建相册页面
                    echo "<div class='userInfo_box_con'>
			  <h2><div style='float:left;' class='com_tit'>添加相册<span>HEAD PORTROIT</span></div><div class='potos_bq'> <a href='javascript:showInfos(1,4)'>返回相册列表</a></div></h2>
			   <div class='up_photo'>
			    上传封面：<form style='position:relative;left:80px;top:-18px;*top:-15px;' method='post' enctype='multipart/form-data' action='".url_for('user/editinfos')."'>
	<div id='view_photo'><input type='hidden' name='userEdit' id='userEdit' value='2'/>
        <input type='hidden' name='userload' id='userload' value='1'/>
      <input type='file' name='file1' id='file1'/>
      <p style='margin-bottom:10px;margin-top:8px;'>(大小为150*110像素最佳,3/4比例)</p>
      <p style='position:relative;left:-78px;padding-bottom:15px;'>相册标题：&nbsp;<input type='text' class='ipt211'  name='photo_title1' ></p>
   </div>
   <div style='padding-top:15px;'><input name='a1' class='sear01' type='submit' value='确定修改' />　　<input name='a2' class='sear01' type='reset' value='重&nbsp;置' /></div>
</form></div></div>";
                    break;
                case "2": //加载添加相片页面
                    echo "<div class='userInfo_box_con'>
			  <h2><div class='com_tit' style='float:left;'>添加相片<span>HEAD PORTROIT</span></div> <div class='potos_bq'> <a href='javascript:showInfos(1,5,".$_REQUEST["contentId"].")'>返回相册</a></div></h2>
    <form  method='post' enctype='multipart/form-data' action='".url_for('user/editinfos')."'>
<input type='hidden' name='userEdit' id='userEdit' value='2'/>
        <input type='hidden' name='userload' id='userload' value='2'/>
        <input type='hidden' name='photoId' id='photoId' value='".$_REQUEST["contentId"]."'/>			   
<div class='up_photo'>
			    上传相片1：<div style='position:relative;left:80px;top:-18px;*top:-15px;'>
	<div>
      <input type='file' name='file1' id='file1'/>
      <p style='margin-bottom:10px;margin-top:8px;'>(大小为150*110像素最佳,3/4比例)</p>
      <p style='position:relative;left:-78px;padding-bottom:15px;'>相片描述：&nbsp;<input type='text' class='ipt211'  name='photo_title1' ></p>
   </div>
   </div>
   <div class='up_photo'>
			    上传相片2：<div style='position:relative;left:80px;top:-18px;*top:-15px;'>
	<div>
      <input type='file' name='file2' id='file2'/>
      <p style='margin-bottom:10px;margin-top:8px;'>(大小为150*110像素最佳,3/4比例)</p>
      <p style='position:relative;left:-78px;padding-bottom:15px;'>相片描述：&nbsp;<input type='text' class='ipt211'  name='photo_title2' ></p>
   </div>
   </div>
   <div class='up_photo'>
			    上传相片3：<div style='position:relative;left:80px;top:-18px;*top:-15px;'>
	<div>
      <input type='file' name='file3' id='file3'/>
      <p style='margin-bottom:10px;margin-top:8px;'>(大小为150*110像素最佳,3/4比例)</p>
      <p style='position:relative;left:-78px;padding-bottom:15px;'>相片描述：&nbsp;<input type='text' class='ipt211'  name='photo_title3' ></p>
   </div>
   </div>
   <div class='up_photo'>
			    上传相片4：<div style='position:relative;left:80px;top:-18px;*top:-15px;'>
	<div>
      <input type='file' name='file4' id='file4'/>
      <p style='margin-bottom:10px;margin-top:8px;'>(大小为150*110像素最佳,3/4比例)</p>
      <p style='position:relative;left:-78px;padding-bottom:15px;'>相片描述：&nbsp;<input type='text' class='ipt211'  name='photo_title4' ></p>
   </div>
   </div>
   <div class='up_photo'>
			    上传相片5：<div style='position:relative;left:80px;top:-18px;*top:-15px;'>
	<div>
      <input type='file' name='file5' id='file5'/>
      <p style='margin-bottom:10px;margin-top:8px;'>(大小为150*110像素最佳,3/4比例)</p>
      <p style='position:relative;left:-78px;padding-bottom:15px;'>相片描述：&nbsp;<input type='text' class='ipt211'  name='photo_title5' ></p>
   </div>
   </div>
   <div style='padding-top:15px;'><input name='a1' class='sear01' type='submit' value='确定' />　　<input name='a2' class='sear01' type='reset' value='重&nbsp;置' /></div>
</div></form></div>";
                    break;
                case "3":
                    echo "";
                    break;
    case "4":
        echo "<div class='userInfo_box_con'>
			  <h2><div class='com_tit' style='float:left;'>更改相册名称<span>MY PHOTOS</span></div> <div class='potos_bq'> <a href='javascript:showInfos(1,5,".$_REQUEST["contentId"].")'>返回相册</a></div></h2>
			  <div class='g_main photo_wrap'><div class='tableblock3'>
		     <form action='".url_for('user/editinfos')."'  method='post'>
               <input type='hidden' name='userEdit' id='userEdit' value='2'/>
        <input type='hidden' name='userload' id='userload' value='4'/>
                 <input type='hidden' name='photoId' id='photoId' value='".$_REQUEST["contentId"]."'/>
				相册名称:<input type='text' id='addGname' name='addGname' value='".$photoT->getTitle()."' >
				<input type='submit' class='g_btn_1' value='保存'>
			</form>
		</div>
			</div></div>";
        break;
} }
?>